<template>
  <view class="box_content" :style="{ marginBottom: marBottom }">
    <view class="box_title flex">
      <view class="blue_line"></view>
      <view class="box_name flex1">{{ title }}</view>
      <view class="more flex" v-if="isMore" @tap.stop="moreList">
        {{ $t("mf.home.more") }} <image src="/static/mf/home/right_arrow.png" />
      </view>
    </view>
    <slot></slot>
  </view>
</template>

<script>
export default {
  props: {
    title: {
      tpye: String,
      default: "标题",
    },
    isMore: {
      type: Boolean,
      default: false,
    },
    marBottom: {
      type: String,
      default: "50rpx",
    },
  },
  methods: {
    moreList() {
      this.$emit("moreList");
    },
  },
};
</script>

<style>
.box_content {
  width: 100%;
  box-sizing: border-box;
}
.box_title {
  align-items: center;
  margin-bottom: 35rpx;
}
.blue_line {
  width: 10rpx;
  height: 40rpx;
  background: #015fff;
  border-radius: 5rpx;
  margin-right: 20rpx;
}
.box_name {
  height: 50rpx;
  font-size: 36rpx;
  font-family: PingFangSC-Medium, PingFang SC;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  line-height: 50rpx;
}
.more {
  height: 45rpx;
  font-size: 32rpx;
  font-family: PingFangSC-Medium, PingFang SC;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  line-height: 45rpx;
}
.more image {
  width: 40rpx;
  height: 40rpx;
}
</style>